<?php
require_once '../functions.php';
/**
 * 根据客户端传递过来的ID删除对应数据
 */
if(empty($_GET['id'])){
  exit('数据异常');
}

$id= $_GET['id'];

$row = xiu_execute("delete from categories where id in ( {$id} );");

header("Location: /admin/categories.php");
// $id = (int)$_GET['id'];
// => '1 or 1 = 1'
// sql 注入
// 1,2,3,4
?>